//
//  HomeUploadModel.swift
//  MT
//
//  Created by M on 2019/12/28.
//  Copyright © 2019 张强. All rights reserved.
//

import UIKit
import MTCategory
import ObjectMapper

class HomeUploadModel: Mappable {

    /// 进度条
    var progress: Double = 0
    
    /// 上传资源
    var assets: [MTAsset]?
    
    /// 地址
    var area: String?
    
    /// 文本内容
    var content: String?
    
    /// 展示信息
    var msg: String?
    
    /// 上传封面图地址 （ 仅视频时使用 ）
    var uploadCoverImagePath: String?
    
    /// 上传视频地址（ 仅视频时使用 ）
    var uploadVideoPath: String?
    
    /// 图片数组
    var imagePaths: [String]?
    
    @objc
    enum Status: Int {
        case uploading
        case fail
        case success
    }
    var status: Status = .uploading
    
    required init?(map: Map) {
        
    }
    
    open func mapping(map: Map) {
        content         <- map["content"]
        area            <- map["area"]
        assets          <- map["assets"]
    }
}
